<include file="Public:head" />
<body>
<div id="body-wrapper">
  <div id="sidebar">
    <div id="sidebar-wrapper">
		<include file="Public:left-nav" />
    </div>
  </div>
  <!-- End #sidebar -->
  <div id="main-content">
    <!-- Page Head -->
    <ul class="shortcut-buttons-set">
      <li><a class="shortcut-button" href="__APP__/Userdata/add"><span><img src="__PUBLIC__/admin/images/icons/paper_content_pencil_48.png"><br/>新增</span></a></li>
	  <li><a class="shortcut-button" href="__APP__/Userdata/delhome"><span><img src="__PUBLIC__/admin/images/icons/10.png"><br/>回收站</span></a></li>
    </ul>
    <!-- End .shortcut-buttons-set -->
    <div class="clear"></div>
    <!-- End .clear -->
    <div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h4>职位管理</h4>
      </div>
      <!-- End .content-box-header -->
	  <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
		$(document).ready(function(){
				$('select[name=classif]').val('{$classif}');
				$('.status').bind('click',function(){
						var numid = $(this).attr("num");
				$.post('__URL__/status/'+numid,function(jdata){
						//if(confirm("<?php echo $confirm?>")){
						if(jdata.status==1){
										if(jdata.data!=''){
												$('#ajax').show().animate({'margin-top':'5px'}).html('<div><b>'+jdata.info+'</b></div>').delay(100).animate({'margin-top':'-5px'}).fadeOut(500);
												$('.status[num='+numid+']').html(jdata.data);
										}else{
											alert('数据有误，请联系管理员！');
										}
								}else{
												$('#ajax').show().animate({'margin-top':'5px'}).html('<div><b>'+jdata.info+'</b></div>').delay(100).animate({'margin-top':'-5px'}).fadeOut(500);
												$('.status[num='+numid+']').html(jdata.data);
										}
						//}
				});
		});
				$('.del').bind('click',function(){
					if(confirm("确定删除到回收站吗？")){
						var numid = $(this).attr("delnum");
				$.post('__URL__/del/'+numid,function(jdata){
						//if(confirm("<?php echo $confirm?>")){
						if(jdata.status==3){
										if(jdata.data!=''){
												$('#ajax').show().animate({'margin-top':'5px'}).html('<div><b>'+jdata.info+'</b></div>').delay(300).animate({'margin-top':'-5px'}).fadeOut(500);
												$('tr[delnum='+numid+']').remove();
										}else{
											alert('数据有误，请联系管理员！');
										}
								}else{
												$('#ajax').show().animate({'margin-top':'5px'}).html('<div><b>'+jdata.info+'</b></div>').delay(300).animate({'margin-top':'-5px'}).fadeOut(500);
												//$('<?php echo $button?>[num='+numid+']').html(jdata.data);
										}
						//}
				});
					} //confirm end
		});
		});
</script>
<div id="ajax" class="notification" style="width:20%;margin-left:22%; position: absolute;top:10%;background-color:#99ff00;display:none;position:fixed;z-index:1000;">
      
    </div>
<div class="content-box-content">
        <div class="tab-content default-tab">
         <div class="notification information">
      <div>
				<form method="post" action="__APP__/Userdata">
					<div id="soso">
                    <select name="classif">
                      <option value="0">&nbsp;全&nbsp;部</option>
					  <option value="1">员工编号</option>
                      <option value="2">座机电话</option>
                      <option value="3">员工姓名</option>
                    </select>
					<input type="text" name="text" value="{$soso}">
					<input type="submit" value="开始搜索">
                    <!-- <a class="button">开始搜索</a>  -->
				</div>
				</form>
	 </div>
    </div>
          <table border="0" cellpadding="0" cellspacing="0">
            <thead>
              <tr>
                <th>
                  编号
                </th>
				<th width="100">用户头像</th>
                <th>员工姓名</th>
                <th>员工信息</th>
				<th>qq留言</th>
				<th>关注微博</th>
				<!-- <th>二维码</th> -->
				<th>状态</th>
				<th>操作</th>
              </tr>
            </thead>
            <tfoot>
              <tr>
                <td colspan="6">
                  <div class="bulk-actions align-left">
						<!-- <button id="submit">批量删除</button> -->
				  </div>
                  <div class="pagination"><a href="#" class="number current">{$page}{$empty}</a> 
				  </div>
                  <!-- End .pagination -->
                  <div class="clear"></div>
                </td>
              </tr>
            </tfoot>
            <tbody>
			<foreach name="list" item="vo">
              <tr delnum="{$vo.id}">
                <td>
                  <!-- <input type="checkbox" value="{$vo.id}" name='id[]'/> -->{$vo.cid}
                </td>
				<td><empty name="vo.imgpath"><img src="__PUBLIC__/images/none-img.jpg" width="150" height="150"><br><a class="shortcut-button" href="__URL__/upload/{$vo.id}"><span>上传照片 </span></a><else /> <img  src="__PUBLIC__/images/userdata/{$vo.imgpath}" border="0" width="150" height="150"><br><a class="shortcut-button" href="__URL__/upload/{$vo.id}"><span>修改照片 </span></a></empty></td>
                <td><p>{$vo.username}</p></td>
                <td><p>排序为第{$vo.time}位</p><p>擅长行业：{$vo.industry}</p><p>主做职位：{$vo.dojob}</p><p>QQ：<empty name="vo.ihone">不公开<else />{$vo.ihone}</empty></p><p>员工邮箱：{$vo.email}</p></td>
				<td><empty name="vo.qqliuyan"><p>未添加留言模块</p><else/>{$vo.qqliuyan}<br></empty></td>
				<td><empty name="vo.sinawb">未加新浪微博<else />{$vo.sinawb}</empty><br><br><empty name="vo.sinawb">未加腾讯微博<else />{$vo.qqwb}</empty></td>
				<!-- <td><empty name="vo.erweima"><a href="#">上传照片</a><else /> <img src="__PUBLIC__/Upload/{$vo.erweima}" border="0" width="100" height="100"><br><a href="#">修改照片</a></empty></td> -->
				<td><switch name="vo.status">
						<case value="1"><span class="status" num="{$vo.id}" style="color:#33cc00;cursor: pointer;">发布中</case>
						<case value="2"><span style="color:#808080;cursor: pointer;" class="status" num="{$vo.id}">关闭发布</span></case>
					</switch></td>
                <td>
                  <a href="__APP__/Userdata/edit/{$vo.id}" title="修改用户信息"><img src="__PUBLIC__/admin/images/icons/pencil.png" alt="Edit" /></a>&nbsp;&nbsp;|&nbsp;&nbsp;<span class="del" delnum="{$vo.id}"><img src="__PUBLIC__/admin/images/icons/cross.png" alt="Delete" /></span> </td>
              </tr>
			 </foreach>
            </tbody>
          </table>
        </div>
      </div>
      <!-- End .content-box-content -->
    </div>
    <div id="footer"> <small>
      &#169;腾驹达后台 2013| Powered<a href="#">admin</a> | <a href="#">Top</a> </small> 
	  </div>
    <!-- End #footer -->
  </div>
  <!-- End #main-content -->
</div>
<!-- End #body-wrapper-->
</body>
</html>
